import { http } from "@/utils/http";

export const BindEmail = (
	data: Eps.AccountService.BindEmail_Params = {}
): Promise<Eps.AccountService.BindEmail> => {
	return http.post(`/AccountService/BindEmail`, Object.values(data));
};

export const BindPhone = (
	data: Eps.AccountService.BindPhone_Params = {}
): Promise<Eps.AccountService.BindPhone> => {
	return http.post(`/AccountService/BindPhone`, Object.values(data));
};

export const GetFriends = (
	data: Eps.AccountService.GetFriends_Params = {}
): Promise<Eps.AccountService.GetFriends> => {
	return http.post(`/AccountService/GetFriends`, Object.values(data));
};

export const GetPassportInfo = (
	data: Eps.AccountService.GetPassportInfo_Params = {}
): Promise<Eps.AccountService.GetPassportInfo> => {
	return http.post(`/AccountService/GetPassportInfo`, Object.values(data));
};

export const GetUserInfo = (
	data: Eps.AccountService.GetUserInfo_Params = {}
): Promise<Eps.AccountService.GetUserInfo> => {
	return http.post(`/AccountService/GetUserInfo`, Object.values(data));
};

export const GetUserName = (
	data: Eps.AccountService.GetUserName_Params = {}
): Promise<Eps.AccountService.GetUserName> => {
	return http.post(`/AccountService/GetUserName`, Object.values(data));
};

export const IsSetedPayPassword = (
	data: Eps.AccountService.IsSetedPayPassword_Params = {}
): Promise<Eps.AccountService.IsSetedPayPassword> => {
	return http.post(`/AccountService/IsSetedPayPassword`, Object.values(data));
};

export const Login = (
	data: Eps.AccountService.Login_Params = {}
): Promise<Eps.AccountService.Login> => {
	return http.post(`/AccountService/Login`, Object.values(data));
};

export const RefreshToken = (
	data: Eps.AccountService.RefreshToken_Params = {}
): Promise<Eps.AccountService.RefreshToken> => {
	return http.post(`/AccountService/RefreshToken`, Object.values(data));
};

export const RegisterWithEmail = (
	data: Eps.AccountService.RegisterWithEmail_Params = {}
): Promise<Eps.AccountService.RegisterWithEmail> => {
	return http.post(`/AccountService/RegisterWithEmail`, Object.values(data));
};

export const RegisterWithPhone = (
	data: Eps.AccountService.RegisterWithPhone_Params = {}
): Promise<Eps.AccountService.RegisterWithPhone> => {
	return http.post(`/AccountService/RegisterWithPhone`, Object.values(data));
};

export const ResetPasswordWithEmail = (
	data: Eps.AccountService.ResetPasswordWithEmail_Params = {}
): Promise<Eps.AccountService.ResetPasswordWithEmail> => {
	return http.post(`/AccountService/ResetPasswordWithEmail`, Object.values(data));
};

export const ResetPasswordWithPhone = (
	data: Eps.AccountService.ResetPasswordWithPhone_Params = {}
): Promise<Eps.AccountService.ResetPasswordWithPhone> => {
	return http.post(`/AccountService/ResetPasswordWithPhone`, Object.values(data));
};

export const ResetPayPasswordWithEmail = (
	data: Eps.AccountService.ResetPayPasswordWithEmail_Params = {}
): Promise<Eps.AccountService.ResetPayPasswordWithEmail> => {
	return http.post(`/AccountService/ResetPayPasswordWithEmail`, Object.values(data));
};

export const ResetPayPasswordWithPhone = (
	data: Eps.AccountService.ResetPayPasswordWithPhone_Params = {}
): Promise<Eps.AccountService.ResetPayPasswordWithPhone> => {
	return http.post(`/AccountService/ResetPayPasswordWithPhone`, Object.values(data));
};

export const SendPhoneVerifyCode = (
	data: Eps.AccountService.SendPhoneVerifyCode_Params = {}
): Promise<Eps.AccountService.SendPhoneVerifyCode> => {
	return http.post(`/AccountService/SendPhoneVerifyCode`, Object.values(data));
};

export const SetNickName = (
	data: Eps.AccountService.SetNickName_Params = {}
): Promise<Eps.AccountService.SetNickName> => {
	return http.post(`/AccountService/SetNickName`, Object.values(data));
};

export const UserExist = (
	data: Eps.AccountService.UserExist_Params = {}
): Promise<Eps.AccountService.UserExist> => {
	return http.post(`/AccountService/UserExist`, Object.values(data));
};

export const SubmitBeAgent = (
	data: Eps.AccountService.SubmitBeAgent_Params = {}
): Promise<Eps.AccountService.SubmitBeAgent> => {
	return http.post(`/AccountService/SubmitBeAgent`, Object.values(data));
};

export const GetContries = (
	data: Eps.AccountService.GetContries_Params = {}
): Promise<Eps.AccountService.GetContries> => {
	return http.post(`/AccountService/GetContries`, Object.values(data));
};

export const GetPhoneAreas = (
	data: Eps.AccountService.GetPhoneAreas_Params = {}
): Promise<Eps.AccountService.GetPhoneAreas> => {
	return http.post(`/AccountService/GetPhoneAreas`, Object.values(data));
};

export const SearchUserId = (
	data: Eps.AccountService.SearchUserId_Params = {}
): Promise<Eps.AccountService.SearchUserId> => {
	return http.post(`/AccountService/SearchUserId`, Object.values(data));
};

export const SubmitContact = (
	data: Eps.AccountService.SubmitContact_Params = {}
): Promise<Eps.AccountService.SubmitContact> => {
	return http.post(`/AccountService/SubmitContact`, Object.values(data));
};

export const SendEmailVerifyCode = (
	data: Eps.AccountService.SendEmailVerifyCode_Params = {}
): Promise<Eps.AccountService.SendEmailVerifyCode> => {
	return http.post(`/AccountService/SendEmailVerifyCode`, Object.values(data));
};
